<template>
  <nf-find
    :findValue="state.findValue"
    :findArray="state.findArray"
    :active="active"
    v-bind="findMeta"
  >
  </nf-find>
</template>


<script lang="ts">
  import { defineComponent, reactive } from 'vue'
  import _findMeta from '../../find/find.json'
  import { getListState } from '../controller/test-list'
 
  export default defineComponent({
    name: 'nf-ui-elp-comp-find',
    props: {
      moduleId: Number,
      active: Object
    },
    setup(props, context) {
      // 获取表单控件需要的meta
      const findMeta = reactive(_findMeta)
      // 改为插槽
      // formMeta.itemMeta[101].controlType = 1

      // 获取里面定义的局部状态
      const state = getListState()

      // 根据 meta 创建表单的 model
      const findValue = reactive({})
      const findArray = reactive([])

      return {
        findMeta,
        state
      }
    }
  })
 

</script>